#pragma once 

class Player;
class CollGeom;
class PlayerObj;
class CannonBall;

class Obj
{
public:

	enum Type { type_obj, type_playerObj, type_weapon, type_cannonBall };

    Obj(const glm::vec3 & pos);
    virtual ~Obj() = 0;

	virtual void handleColl(Obj* other) = 0;
	virtual void handleColl(PlayerObj* other) = 0;
	virtual void handleColl(CannonBall* other) = 0;

    virtual void update(float dt) = 0;
    virtual void draw(bool picking) = 0;
	virtual CollGeom* getCollGeom() = 0; 
    bool hasPickColor(unsigned short color);
    void setPos(glm::vec2 pos) { m_pos.x = pos.x; m_pos.z = pos.y; }
	glm::vec2 getPos2() { return glm::vec2(m_pos.x, m_pos.z); }
	glm::ivec2 getScreenPos(const glm::mat4& viewMatrix); 

	glm::vec3 m_pos;
	Type getType() { return type; }
	bool toBeDeleted;
protected:
    unsigned short m_pickColor;
	Type type;
};